package dynamicPrograming;

/**
 * 爬楼梯
 * @author le
 */
public class ClimbStairs
{

    private final static int N = 4;

    public static void main(String[] args)
    {
        int[] dp = new int[N];
        dp[0] = 1;
        dp[1] = 2;
        for (int i = 2;i < N;i++){
            dp[i] = dp[i-1] + dp[i-2];
        }
        System.out.println(dp[N-1]);
    }
}
